/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cctype>
#include <cstdio>

std::vector<std::string> input_words;

int cas(std::vector<std::string> words) {
    int sum = 0;
    for (const auto &word : words) {
        if (std::isupper(word[0]) &&
            (word[0] == 'Q' || word[0] == 'W' || word[0] == 'E' || word[0] == 'R' ||
             word[0] == 'T' || word[0] == 'Y')) {
            sum++;
        }
    }
    return sum;
}

int vs(std::vector<std::string> words) {
    int sum = 0;
    for (const auto &word : words) {
        bool found = false;
        for (char c : word) {
            if (std::tolower(c) >= 'a' && std::tolower(c) <= 'z') {
                found = true;
                break;
            }
        }
        if (found) {
            sum++;
        }
    }
    return sum;
}

int csgo(std::vector<std::string> words) {
    int sum = 0;
    for (const auto &word : words) {
        if (word.length() <= 3) {
            sum++;
        }
    }
    return sum;
}

std::string yui(std::vector<std::string> words) {
    std::string max_word = *std::max_element(words.begin(), words.end(), [](const auto &a, const auto &b) {
        return a.length() < b.length();
    });
    return max_word;
}

int grf(std::vector<std::string> words) {
    int sum = 0;
    for (const auto &word : words) {
        if (-1 != word.find('-')) { // this is faster than using a std::string::find
            sum++;
        }
    }
    return sum;
}



